package com.zyc.fuckfx.base;


import javafx.scene.input.Clipboard;
import javafx.scene.input.ClipboardContent;
import javafx.scene.input.DataFormat;

public class ClipboardUtil {

    public static void copy(String value) {
        Clipboard cb = Clipboard.getSystemClipboard();
        ClipboardContent ct = new ClipboardContent();
        ct.putString(value);
        cb.setContent(ct);
        if(cb.hasContent(DataFormat.HTML))
        {
            Log.i(cb.getHtml());
        }
        if(cb.hasString())
        {
            Log.i(cb.getString());
        }
    }
}
